package org.qq.tv.web.tools;


import org.qq.tv.web.mapper.pojo.task.*;

public class OutUpDate {
    public static void out(UpTaskDate date) {
        //任务类型 判断
        switch (date.getTaskTyep()) {
            case UpTaskDate.addweb:
                //添加网站
                //addweb();
                break;
            case UpTaskDate.addGroup:
                //添加分组

                break;
            case UpTaskDate.upDate:
                //更新数据

                break;
            case UpTaskDate.paginfCount:
                //计算分组条目分
                OutUpDate.outTableWeb(date);
                OutUpDate.outtableGroups(date);
                OutUpDate.outtableGroupsItem(date);
                break;
            case UpTaskDate.videoItem:
                //视频条目解析
                OutUpDate.videoItem(date);
                break;
            case UpTaskDate.videoMessage:
                //视频信息解析
                //  System.out.println("videoMessage");
                OutUpDate.outtableVideoMessage(date);
                break;
        }
        //释放任务数量

    }

    public static void outTableWeb(UpTaskDate date) {
        System.out.println("网站信息");
        System.out.println(date.getTableWeb().getId());
        System.out.println(date.getTableWeb().getName());

    }


    public static void outtableHostWeb(UpTaskDate date) {
        System.out.println("网站网址");
        System.out.println(date.getTableHostWeb().getId());
        System.out.println(date.getTableHostWeb().getWebId());
        System.out.println(date.getTableHostWeb().getPath());

    }

    public static void outtableGroups(UpTaskDate date) {
        System.out.println("网站分组信息");
        System.out.println(date.getTableGroups().getId());
        System.out.println(date.getTableGroups().getWebId());
        System.out.println(date.getTableGroups().getName());
        System.out.println(date.getTableGroups().getPath());

    }

    public static void outtableGroupsItem(UpTaskDate date) {
        System.out.println("网站分组条目信息");
        System.out.println(date.getTableGroupsItem().getId());
        System.out.println(date.getTableGroupsItem().getGroupId());
        System.out.println(date.getTableGroupsItem().getName());
        System.out.println(date.getTableGroupsItem().getPath());

    }

    public static void outtableVideoMessage(UpTaskDate date) {
        System.out.println("视频信息");
        System.out.println(date.getTableVideoMessage().getId());
        System.out.println(date.getTableVideoMessage().getVideoGroupId());
        System.out.println(date.getTableVideoMessage().getGroupItemId());
        System.out.println(date.getTableVideoMessage().getName());
        System.out.println(date.getTableVideoMessage().getUptime());
        System.out.println(date.getTableVideoMessage().getPlayitmp());
        System.out.println(date.getTableVideoMessage().getPlaycont());
        System.out.println(date.getTableVideoMessage().getImagepath());
        System.out.println(date.getTableVideoMessage().getHtmlweb());
        System.out.println(date.getTableVideoMessage().getHttpmp4());
        System.out.println(date.getTableVideoMessage().getPlaym3u8());


    }

    public static void videoItem(UpTaskDate date) {
        OutUpDate.outTableWeb(date);
        OutUpDate.outtableGroups(date);
        OutUpDate.outtableGroupsItem(date);
        OutUpDate.outtableVideoMessage(date);
    }


    private static void videoMessage(UpTaskDate date) {

    }

    private static void groupItemCount(UpTaskDate date) {
    }
}
